<html xmlns="http://www.w3.org/1999/xhtml">  
    <head>  
        <style>  
        body{  
            padding:0px;  
            margin:0px;  
        }  
  
        .clearfix:after{  
            content:"";  
            height:0px;  
            visibility:hidden;  
            display:block;  
            clear:both;  
        }  
              
        .clearfix{  
            zoom:1;
        }  
              
        #container{  
            font-size:20px;  
            background-color:#eee;  
            border:solid 3px #ddd;  
        }  
  
        #float_box{  
            background-color:#fff;  
            border:solid 3px #bbb;  
            width:80px;  
            height:100px;  
            float:left;  
        }  
        </style>  
    </head>  
  
    <body>  
        <div id="container" class="clearfix">  
            <div id="float_box">floated element</div>  
            <h>the container</h>  
        </div>  
  
    </body>  
</html>  